<?php header("Content-Type:text/html;charset=utf-8") ?>
<!DOCTYPE html>
<html>
<head>
	<title>PaiTa账户密码修改</title>
	<style>
		#logo {
			margin: auto;
			width: 137px;
			margin-bottom: 19px;
		}
		.pwd {
			display: block;
			width: 275px;height: 39px;
			margin: auto;font-size: 14px;
			margin-bottom: 15px;
			border: 1px solid #808080;
			padding-left: 11px;
			font-family: "华文细黑";
		}
		.submit {
			margin: auto;display: block;
			width:290px; height:38px; background:#ff8409;
			font-family: "华文细黑";font-size: 14px;
			color: #FFF;border-style: none;
			
		}
		.submit:hover {
			background-color: #EA7500;
			cursor: pointer;
		}

		#pwd_error {
			display: none;
			width: 290px;
			margin: auto;
			margin-bottom: 15px;
		}
	</style>
	<script src="http://cdn.staticfile.org/jquery/1.8.3/jquery.min.js"></script>
</head>
<body>
	<?php
		$url = current_url();
		$url_array = parse_url($url);
		$i = explode('/',$url_array['path']);
		$j = array_pop($i);
		$k = base64_decode($j);
	?>
<div style="padding-left:34px">
	<div id="logo">
		<p><img src="<?php echo base_url() ?>img/logo.png" width="137px"></p>
	</div>
	<div id="pwd_error">
		<img src="<?php echo base_url() ?>img/pwd_error.png" width="286px" height="39px">
	</div>
	<div id="form">
		<form action="<?php echo site_url() ?>/reset_pass/index/<?php echo $j ?>" method="post">
			<input type="hidden" name="email" value="<?php echo $k ?>" readonly="readonly">
			<p><input type="password" name="new_pass" placeholder="密码" class="pwd">
			<p><input type="password" name="confirm_pass" placeholder="密码确认" class="pwd">
			<p><input type="submit" value="重设密码" class="submit"></p>
		</form>
	</div>
</div>

<script>
	$(function(){
		$('.submit').click(function(){
			var pass = [];
			$("input[type=password]").each(function(){
                pass.push($(this).val());
            });
            var a=pass[0];
            var b=pass[1];

			if(a == b && a != '' && b != '') {
				return;
			}else{
				$('#pwd_error').css({"display":"block"});
				return false;
			}
		})
	})
</script>


</body>
</html>